<?php 
namespace app\sgwy\controller\v1; 
use app\sgwy\controller\BaseCommon;
use app\sgwy\logic\NewsLogic; 

class News extends BaseCommon
{
    private $newLogic=null;  
    private $params=null;  

    public function __construct()
    {
        parent::__construct(); 
		$this->params=$this->request;
        $this->newLogic = new NewsLogic(); 
    }

	public function index()
	{ 
        $this->ajaxReturn($this->failError['FFQQ']);   
	}

	public function get_new_list()
	{  
		$page=isset($this->params['page'])?intval($this->params['page']):1;
		$pageSize=isset($this->params['pageSize'])?intval($this->params['pageSize']):10;
		
		$dataList=$this->newLogic->getList(['status'=>1], ['title','content'],"status desc,id desc", $page, $pageSize);
        $this->failError['SUCCESS']['data'] = $dataList;
        $this->ajaxReturn($this->failError['SUCCESS']); 
	}  
}